<!-- service 页面内容 -->
<section class="service register col-xs-12" ng-controller="serviceCtrl">

  <div class="container">
      <div class="row register-head hidden-xs">
        资源整合，合作共赢
      </div>
      <div class="row register-summary hidden-xs">
        享受自由工作， 随时随地地赚取更多收入，稳定可靠
      </div>
      <div class="row register-content">
        <div class="col-lg-5 col-md-5 col-sm-5 col-xs-12 padding-reset swiper-btns">
          <ul>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4 padding-reset text-center swiper-btn-item" ui-sref-active='active' ui-sref="register">
              用户注册
            </li>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4 padding-reset text-center swiper-btn-item" ui-sref-active='active' ui-sref="service">
              服务商加盟
            </li>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4 padding-reset text-center swiper-btn-item" ui-sref-active='active' ui-sref="brand">
              品牌商加盟
            </li>
          </ul>
          <div class="swiper-block hide">
          </div>
        </div>

          <div class="col-md-8 col-sm-8 col-xs-12 register-form yf-shadow">

            <form name="serviceform11" id='serviceform1' class="registerform" role="form" autocomplete="false" ng-show="!bool" novalidate ng-submit="next(serviceform11.$invalid);">
                <div class="form-group">
                    <input type="text" ng-model="user.real_name" name='nick_name' class="form-control" ng-pattern="/^[A-Za-z0-9\u4e00-\u9fa5]{2,20}$/" placeholder="姓名" required>
                </div>
                <div class="form-group error-container" ng-show="isserviceform1 && (serviceform11.nick_name.$error.pattern || serviceform11.nick_name.$error.required)">
                    请输入长度 2-20位的名字(中文，字母，数字组成)！
                </div>

                <!-- <div class="form-group">
                    <input type="tel" ng-model="user.tel" name='tel' class="form-control" ng-pattern="/^1[34578]\d{9}$/" placeholder="手机号" required>
                </div>
                <div class="form-group error-container" ng-show="isserviceform1 && (serviceform11.tel.$error.pattern || serviceform11.tel.$error.required)">
                    请输入有效手机号！
                </div> -->

                <div class="form-group send-code-input">
                    <a href="javascript:void(0);" class="btn btn-default send-code-btn pull-right" ng-click="sendCode(user.tel);" ng-disabled="isDisplayTime" ng-bind="isDisplayTime ? count_down_time + '秒后发送': '发送验证码'"></a>
                    <input type="tel" ng-model="user.tel" name='telservice' class="form-control" ng-pattern="/^1[34578]\d{9}$/" placeholder="手机号" autocomplete="false" required>
                </div>
                <div class="form-group error-container" ng-show="isserviceform1 && (serviceform11.telservice.$error.pattern || serviceform11.telservice.$error.required)">
                    请输入有效手机号！
                </div>

                <div class="form-group">
                    <input type="tel" ng-model="user.code" ng-pattern="/\d{6}/i" class="form-control" placeholder="验证码" autocomplete="false" name='code' required>
                </div>
                <div class="form-group error-container" ng-show="isserviceform1 && (serviceform11.code.$error.pattern || serviceform11.code.$error.required)">
                    请正确输入验证码
                </div>

                <div class="form-group">
                    <input type="email" ng-model="user.email" name='serviceemail' class="form-control" ng-pattern="/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/" placeholder="邮箱">
                </div>
                <div class="form-group error-container" ng-show="isserviceform1 && (serviceform11.serviceemail.$error.pattern)">
                    请正确输入邮箱！
                </div>

                <div class="form-group">
                    <input type="password" ng-model="user.password" name='password' class="form-control" ng-pattern="/^\S{6,20}$/" placeholder="密码" required>
                </div>
                <div class="form-group error-container" ng-show="isserviceform1 && (serviceform11.password.$error.pattern || serviceform11.password.$error.required)">
                    请输入 6-20 位的有效密码！
                </div>

                <div class="form-group">
                    <label class="checkbox-inline">
                      <input type="checkbox" id="checkbox" value="true" ng-click="isargee = !isargee" required>
                      <a ui-sref="agreement">同意用户协议</a>
                    </label>
                </div>

                <div class="form-group error-container" ng-show="isserviceform1 && isargee">
                    请确定同意协议
                </div>

                <button type="submit" class="pull-right btn btn-mt-register">
                    下一步
                    <span class="icon-right"></span>
                </button>
            </form>

            <form name="serviceform2" id="serviceform2" autocomplete="false" novalidate ng-show="bool" role="form">
                <div class="form-group two-element">
                    <label for="address" class="col-sm-4 col-xs-4 control-label">详细地址</label>
                    <div class="col-sm-8 col-xs-8">
                        <input type="text" class="form-control" name="serviceform2address" ng-model="user.address" id="address" placeholder="" required>
                    </div>
                </div>
                <div class="form-group error-container" ng-show="isserviceform2 && serviceform2.serviceform2address.$error.required">
                    请输入详细地址！
                </div>

                <div class="form-group two-element noborder">
                    <label for="headimgservice" class="col-sm-4 col-xs-4 control-label">上传证书</label>
                    <div class="col-sm-8 col-xs-8">
                        <button type='button' class="btn btn-default uploadbtn" onclick='document.getElementById("headimgservice").click()'>选择文件</button>
                        <input type="file" class="form-control" style='display: none;' ng-model="user.other" name='headimg' id="headimgservice" placeholder="上传证书">
                    </div>
                </div>

                <div class="form-group preview preview-logo text-center">
                    <img src="" id='previewservice' style="display: none;">
                </div>

                <div class="form-group error-container" ng-show="isheadimg">
                    请上传证书文件！
                </div>

                <div class="row arrow-btns">
                    <button ng-click="bool = false" class="pull-left btn btn-mt-register two-btns">
                        <span class="icon-left"></span> 上一步
                    </button>
                    <button type="submit" class="pull-right btn btn-mt-register two-btns" ng-click="submitService(serviceform2.$invalid, user);">
                        提交审核
                        <span class="icon-right"></span>
                    </button>
                </div>
            </form>
          </div>

          <div class="col-md-4 col-sm-4 col-xs-12 register-tip yf-shadow">
            <span>服务商须知</span>
            <p ng-show="!bool">
              欢迎注册窗管家，服务商因涉及接单业务，请填写您的真实信息，窗管家会进行审核，审核结果将在1～2个工作日内通知您
            </p>
            <p ng-show="bool">
                请上传营业执照清晰彩色原件扫描件或数码照 在有效期内且年检章齐全（当年成立的 可无年检章）,由中国大陆工商局或 市场监督管理局颁发,支持.jpg .jpeg .png . bmp格式照片,大小不超过5M。
            </p>
            <a class="btn btn-default" ui-sref="login">
              已有账号？去登录
            </a>
          </div>
      </div>
  </div>
</section>
